export default {
  title: (title) => {
    return {
      text: title || '',
      textStyle: {
        fontWeight: 'normal',
        fontSize: 23,
        color: 'rgba(255,255,255,.9)'
      },
      left: 'center',
      top: '0'
    }
  },
  grid: {
    top: '15%',
    left: '2%',
    right: '2%',
    bottom: '0',
    containLabel: true
  },
  tooltip: (formatter) => {
    return {
      trigger: 'axis',
      axisPointer: {
        type: 'cross'
      },
      formatter: formatter || null
    }
  },
  legend: (list) => {
    return {
      data: list,
      top: '0%',
      textStyle: {
        color: 'rgba(255,255,255,.6)',
        fontSize: 14
      },
    }
  }
}
